﻿using Autodesk.AutoCAD.Windows;
using PublicClass;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PublicScreenMenue
{
    public class ScreenMenuManager
    {
        static public PaletteSet mPaletteSet = null; // 显示屏幕菜单的面板
        static private FormScreenMenu mScreenMenuForm = new FormScreenMenu();

        static public void ShowScreenMenu()
        {
            if (mPaletteSet == null || mPaletteSet.IsDisposed)
            {
                mPaletteSet = new PaletteSet("屏幕菜单");
                mPaletteSet.Size = new Size(90, 600);
                mScreenMenuForm.Anchor =
                     System.Windows.Forms.AnchorStyles.Top |
                     System.Windows.Forms.AnchorStyles.Left |
                     System.Windows.Forms.AnchorStyles.Right;
                mScreenMenuForm.Dock = DockStyle.Fill;
                mScreenMenuForm.TopLevel = false;
                mScreenMenuForm.Location = new Point(0, 0);
                mPaletteSet.Add("屏幕菜单", mScreenMenuForm);
            }

            mPaletteSet.Visible = true;
            mPaletteSet.Dock = DockSides.Left;
        }


        static public void ShowQuckCmd()
        {
            FormQuckCmd form = new FormQuckCmd();
            form.ShowDialog();
        }
    }
}
